Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Base `histogram` returns syntax errors

    Hi all,

    I'm struggling with broken calls to
    Code:
    histogram
    . The minimum reproducible example is rather silly:

    Code:
    . clear
    
    . sysuse auto
    (1978 automobile data)
    
    . twoway histogram price
    invalid syntax
    r(198);
    
    . histogram price
    (bin=8, start=3291, width=1576.875)
    invalid syntax
    r(198);
    
    . which histogram
    /Applications/Stata/ado/base/h/histogram.ado
    *! version 1.3.6  03apr2025
    
    . macro list
    S_level:        95
    F1:             help advice;
    F2:             describe;
    F7:             save
    F8:             use
    S_ADO:          BASE;SITE;.;PERSONAL;PLUS;OLDPLACE
    S_StataMP:      MP
    S_StataSE:      SE
    S_OS:           MacOSX
    S_OSDTL:        15.5.0
    S_MACH:         Mac (Apple Silicon)
    
    . update all
    (contacting https://www.stata.com)
    
    Update status
        Last check for updates:     28 Jul 2025
        New update available:       none         (as of 28 Jul 2025)
        Current update level:       26 Feb 2025  (what's new)
    The Stata version is StataNow/MP 18.5 for Mac (Apple Silicon) Revision 26 Feb 2025.

    I can upload
    Code:
    histogram.ado
    but that seems to be discouraged by forum norms / it's StataCorp's IP, so I'll refrain until asked to do so.

    Thanks!
    Last edited by Quan Le; 28 Jul 2025, 08:15. Reason: editing minimum example

  • #2
    You should first update Stata. If that doesn't resolve the issue, you may need to reinstall Stata from scratch. histogram is an official command that comes bundled with your Stata installation, so there should be no need to upload any separate ado files.

    Code:
    update all
    If none of these steps work, contact Technical Services for assistance: https://www.stata.com/support/tech-support/contact/.

    Comment


    • #3
      Thanks. Sorry that I just edited the minimum example to include the
      Code:
      update all
      call.

      Will contact tech support.

      Comment


      • #4
        You should probably do a
        Code:
        set trace on
        to see what exactly is throwing the error. It is not histogram.ado itself. That file actually calls graph twoway histogram. You are also separately getting an error with twoway histogram. So that's a clue that it's some program / file called by graph twoway histogram that may have been altered / corrupted.

        Comment

        Working...
        X